package com.schedualnew.mq.dto.esb.xray.pacssource;

import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlElementWrapper;
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement;
import com.schedualnew.mq.dto.esb.AccessControl;
import com.schedualnew.mq.dto.esb.MessageHeader;
import com.schedualnew.mq.dto.esb.ResponseOption;
import com.schedualnew.mq.dto.esb.RetInfo;
import lombok.Data;

import java.util.List;

/**
 * @author ljy aka ryan
 * @date 2023/3/20$ 17:40$
 * @description 获取时段回调
 */
@Data
@JacksonXmlRootElement(localName = "ESBEntry")
public class SourceReceiveESBEntry {
    @JacksonXmlProperty(localName = "AccessControl")
    public AccessControl accessControl;

    @JacksonXmlProperty(localName = "MessageHeader")
    public MessageHeader messageHeader;

    @JacksonXmlProperty(localName = "RetInfo")
    private RetInfo retInfo;

    @JacksonXmlProperty(localName = "ResponseOption")
    private ResponseOption responseOption;

    @JacksonXmlElementWrapper(localName = "MsgInfo")
    @JacksonXmlProperty(localName = "Msg")
    private List<String> msgList;


    @Data
    public static class XRayQueryMsgInfo {
        @JacksonXmlProperty
        @JacksonXmlElementWrapper(useWrapping = false)
        private List<QueryItem> query;

        @JacksonXmlProperty(localName = "flag", isAttribute = true)
        private String flag;
    }


    @Data
    public static class QueryItem {
        private String item;
        private String compy;
        private String value;
        private String splice;
    }

}


